package com.meessiom.train.crm.collection.repository;

import com.meessiom.train.crm.collection.model.Collection;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface CollectionRepository extends JpaRepository<Collection, Long>, JpaSpecificationExecutor<Collection> {
    List<Collection> findByOrderIdContaining(String orderId);
    List<Collection> findByApprovalStatus(String approvalStatus);
    List<Collection> findByOverdueStatus(String overdueStatus);
    List<Collection> findByPaymentMethod(String paymentMethod);
}